#include "Dice.h"
#include <iostream>
#include <string>
#include <ctime>
using namespace std;

Dice::Dice()
{
	this->result = 0;
	srand(time(NULL));
}


void Dice::throwdice()
{
	result = rand() % 6 + 1;
}

void Dice::showdice()
{
	
	switch (this->result)
	{
	case 1:
		cout << "\xda\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xbf\n" "\xb3         \xb3\n" "\xb3         \xb3\n""\xb3    x    \xb3\n""\xb3         \xb3\n""\xb3         \xb3\n""\xc0\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xd9" << endl;
		break;
	case 2:
		cout << "\xda\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xbf\n" "\xb3 x       \xb3\n" "\xb3         \xb3\n""\xb3         \xb3\n""\xb3         \xb3\n""\xb3       x \xb3\n""\xc0\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xd9" << endl;
		break;
	case 3:
		cout << "\xda\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xbf\n" "\xb3 x       \xb3\n" "\xb3         \xb3\n""\xb3    x    \xb3\n""\xb3         \xb3\n""\xb3       x \xb3\n""\xc0\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xd9" << endl;
		break;
	case 4:
		cout << "\xda\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xbf\n" "\xb3 x     x \xb3\n" "\xb3         \xb3\n""\xb3         \xb3\n""\xb3         \xb3\n""\xb3 x     x \xb3\n""\xc0\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xd9" << endl;
		break;
	case 5:
		cout << "\xda\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xbf\n" "\xb3 x     x \xb3\n" "\xb3         \xb3\n""\xb3    x    \xb3\n""\xb3         \xb3\n""\xb3 x     x \xb3\n""\xc0\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xd9" << endl;
		break;
	case 6:
		cout << "\xda\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xbf\n" "\xb3 x     x \xb3\n" "\xb3         \xb3\n""\xb3 x     x \xb3\n""\xb3         \xb3\n""\xb3 x     x \xb3\n""\xc0\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xd9" << endl;
		break;
 	}
}

Dice::~Dice()
{
}
